apiready = () ->
  api.getPrefs
    key: 'userinfo'
  , (ret, err) ->
    if ret.value
      api.alert
        msg: ret
      api.removePrefs
        key: 'userinfo'
    else
      api.openWin
        name: 'signin'
        url: 'html/signin.html'
        bounces: false
        bgColor: '#fff'
        pageParam: {}
